/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.controller.bean;

import com.entities.EventLibrary;
import com.model.EventLibraryModel;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.jboss.weld.context.http.HttpRequestContext;

/**
 *
 * @author NguyenVan
 */
@ManagedBean
@SessionScoped
public class EventLibraryDetails {

    FacesContext fCtx = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest) fCtx.getExternalContext().getRequest();
    int id = 5;
    EventLibraryModel model;
    EventLibrary ev;
    
    public EventLibraryDetails() {
        model = new EventLibraryModel();
        ev = new EventLibrary();
        ev = model.getEventLibraryDetailsById(id);
    }
    
    
    
    private Integer eventId;
    private String name;
    private String description;
    private String eventType;
    private String timeStart;
    private String timeEnd;

    public EventLibrary getEv() {
        
        return ev;
    }

    public void setEv(EventLibrary ev) {
        this.ev = ev;
    }


    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }

    public Integer getEventId() {
        eventId=ev.getEventId();
        return eventId;
    }

    public void setEventId(Integer eventId) {
        this.eventId = eventId;
    }

    public String getName() {
        name=ev.getName();
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        description=ev.getDescription();
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEventType() {
        eventType=ev.getEventType();
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getTimeStart() {
        timeStart=ev.getTimeStart();
        return timeStart;
    }

    public void setTimeStart(String timeStart) {
        this.timeStart = timeStart;
    }

    public String getTimeEnd() {
        timeEnd=ev.getTimeEnd();
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

}
        